package ms.sudoku;

import java.util.ArrayList;
import java.util.List;

import ms.sudoku.technique.EliminationTechnique;

public final class SolverOptions implements Cloneable {
	private int maximumSolutionsToFind = 1;
	private boolean _allowBruteForce = true;
	private List<EliminationTechnique> _techniqueList;

	public SolverOptions() {
	}

	public int getMaximumSolutionsToFind() {
		return maximumSolutionsToFind;
	}

	public void setMaximumSolutionsToFind(int value) {
		if (value <= 0)
			throw new RuntimeException("value");

		maximumSolutionsToFind = value;
	}

	public List<EliminationTechnique> getEliminationTechniques() {
		if (_techniqueList == null)
			_techniqueList = new ArrayList<EliminationTechnique>();

		return _techniqueList;
	}

	public void setEliminationTechniques(List<EliminationTechnique> techniqueList) {
		this._techniqueList = techniqueList;
	}

	public boolean getAllowBruteForce() {
		return _allowBruteForce;
	}

	public void setAllowBruteForce(boolean value) {
		_allowBruteForce = value;
	}

	public SolverOptions clone() {
		try {
			return (SolverOptions) super.clone();
		} catch (CloneNotSupportedException e) {
			throw new RuntimeException(e);
		}

	}
}
